import Layout from "../components/Layout";

let routes = [

  {
    path: "/",
    component: Layout,
    redirect: {
      path: "/defaultHome",
    },
    meta: {
      title: "默认首页",
      icon: "icon-shouye iconfont",
      hidden: true,
      isLogin: true,
    },
    children: [
      {
        path: "defaultHome",
        meta: {
          title: "默认首页",
          icon: "icon-shouye iconfont",
        },
        component: () => import("../views/defaultHome"),
      },
    ],
  },
  //商城
  {
    path: "/shoppingmall",
    component: Layout,
    meta: {
      title: "商城",
      icon: "icon-shangcheng iconfont",
    },
    children: [
      {
        path: "mallInfo",
        meta: {
          title: "商城信息列表",
          icon: " icon-xinxiliebiao iconfont",
        },
        component: () => import("../views/shoppingMall/mallInfo"),
      },
    ],
  },

  //商品
  {
    path: "/goods",
    component: Layout,
    meta: {
      title: "商品",
      icon: "icon-shangpin iconfont",
    },
    children: [
      {
        path: "addGoods",
        meta: {
          title: "添加商品",
          icon: "icon-tianjiashangpin iconfont",
        },
        component: () => import("../views/goods/addGoods"),
      },
      {
        path: "goodsInfo",
        meta: {
          title: "商品列表",
          icon: "icon-shangpinliebiao iconfont",
        },
        component: () => import("../views/goods/goodsInfo"),
      },
      {
        path: "cate",
        meta: {
          title: "商品分类",
          icon: "icon-shangpinliebiao iconfont",
        },
        component: () => import("../views/goods/cate"),
      },
      {
        path: "cateParams",
        meta: {
          title: "分类参数",
          icon: "icon-shangpinliebiao iconfont",
        },
        component: () => import("../views/goods/cateParams"),
      },
    ],
  },
  //营销
  {
    path: "/business",
    component: Layout,
    meta: {
      title: "营销",
      icon: "icon-yingxiao iconfont",
    },
    children: [
      {
        path: "advertisement",
        meta: {
          title: "广告列表",
          icon: "icon-guanggao iconfont",
        },
        component: () => import("../views/business/advertisement"),
      },
     
    ],
  },
  // 订单
  {
    path: "/orders",
    component: Layout,
    meta: {
      title: "订单",
      icon: "icon-tubiaolunkuo- iconfont",
    },
    children: [
      {
        path: "orderInfo",
        meta: {
          title: "订单列表",
          icon: "icon-dingdanliebiao iconfont",
        },
        component: () => import("../views/orders/orderInfo"),
      },
      {
        path: "pay",
        meta: {
          title: "支付方式",
          icon: "icon-dingdanliebiao iconfont",
        },
        component: () => import("../views/orders/pay"),
      },
    ],
  },
  {
    path: "/permission",
    component: Layout,
    meta: {
      title: "权限",
      icon: "icon-quanxian iconfont",
    },
    children: [
      {
        path: "users",
        meta: {
          title: "用户列表",
          icon: "icon-yonghuliebiao iconfont",
        },
        component: () => import("../views/permission/users"),
      },
    ],
  },

  {
    path: "/login",
    component: () => import("../views/login"),
    meta: {
      title: "登录",
      icon: "",
      hidden: true,
    },
  },
];

export default routes;
